package com.gitee.wsl.compose.chart.xy.model


/**
 * An adapter between Multipoints and Points for use with GeneralLinePlot.
 */
internal class ListPointSeriesAdapter<X, Y>(
    val series: Int,
    val data: List<ListPointEntry<X, Y>>
) : AbstractList<PointEntry<X, Y>>() {

    override val size: Int
        get() = data.size

    override fun get(index: Int): PointEntry<X, Y> {
        return PointEntry(data[index].x, data[index].y[series])
    }

}
